package com.demo.core.dao.impl;

import com.demo.core.dao.RecordDao;
import com.demo.core.dao.impl.base.PageCoreDaoSupport;
import com.demo.core.model.Record;
import com.demo.core.model.support.GeneralExecuteModel;

/**
 * 记录数据访问层实现类
 * 
 * @author ryuu.kk
 */
public class RecordDaoImpl extends PageCoreDaoSupport<Record, Long> implements RecordDao {
	
	/**
	 * 配置空间 
	 */
	protected final static String SQLMAP_NAME_SPACE = "recordSpace.";
	
	/**
	 * 数据库的表名
	 */
	protected final static String TABLE_NAME = "T_CORE_RECORD";
	
	/**
	 * 数据库表的主键名称
	 */
	protected final static String TABLE_PK_NAME = "ID";
	
	@Override
	protected String nameSpace() {
		return model.getNameSpace();
	}

	@Override
	protected void doInit(GeneralExecuteModel<Long> model) {
		model.setPk(TABLE_PK_NAME);
		model.setTable(TABLE_NAME);
		model.setNameSpace(SQLMAP_NAME_SPACE);
	}
}